const { DataTypes } = require('sequelize');
const sequelize = require('../index');
const {User} = require("./user");

const WorkSeeker = sequelize.define('db_job_seekers', {
    id: {
        type: DataTypes.INTEGER,
        primaryKey: true,
        autoIncrement: true
    },
    work_id: {
        type: DataTypes.INTEGER,
        allowNull: false,
        references: {
            model: 'db_works',
            key: 'id',
        },
    },
    user_id: {
        type: DataTypes.INTEGER,
        allowNull: false,
        references: {
            model: 'db_users',
            key: 'id',
        },
    },
    status: {
        type: DataTypes.INTEGER,
    },

}, {
    timestamps: false,
});

module.exports = { WorkSeeker };
